#include "board.h"
#include "SHT30.h"
#include "bflb_gpio.h"

float TempAndHumiVal[2] = {0};

void setup() {
  // put your setup code here, to run once:
  Serial.begin(200000);
  board_init();    /* 板卡初始化 */
  SHT30_Init();   /* 初始化SHT30 */
}

void loop() {
  // put your main code here, to run repeatedly:
  /* 读取光照强度 */
		if (SHT30_READ_OK == SHT30_ReadTempAndHumi(TempAndHumiVal))
		{
      Serial.print("SHT30 Read Temperature is: ");
      Serial.print(TempAndHumiVal[0]);
      Serial.print("   Humidity is: ");
      Serial.println(TempAndHumiVal[1]);
		}
		else
		{
			Serial.println("SHT30 Read Err!!!\r\n");
		}
		bflb_mtimer_delay_ms(1000);
}
